home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
comm
/
tcp
/
Amster-main.lha
/
Amster_Install
/
Install_Amster
< prev
next >
Wrap
Text File
|
2000-10-29
|
7KB
|
303 lines
; $VER: Install_Amster 0.8 (29.10.2000)
(procedure P_check-system-version
(set #exec-version (/ (getversion) 65536))
(if (< #exec-version 39)
(abort "Amster needs Kickstart 3.0 or higher.\n")
)
(set #mui-version (/ (getversion "LIBS:muimaster.library") 65536))
(if (< #mui-version 19)
(abort "Amster needs MUI 3.8+.\n")
)
(set #os-version (/ (getversion "LIBS:version.library") 65536))
)
(procedure P_select-destination-directory
(if (exists "Work:" (noreq))
(set @default-dest "Work:")
(set @default-dest "SYS:")
)
(set @default-dest
(askdir
(prompt "Select the directory where you want to install Amster. A new directory will be created.")
(help "No help available.")
(default @default-dest)
)
)
(set @default-dest (tackon @default-dest "Amster/"))
)
(procedure P_select-languages
(if (exists (tackon #source-dir "Catalogs/"))
(
(set #catalog 18) ; Pre-selected language (the empty string)
; if no languages are selected in Locale.
(set #n 0)
(while (set #thislang (select #n
"bosanski" "català" "czech" "dansk" "nederlands" "suomi"
"français" "deutsch" "magyar" "italiano" "norsk" "polski" "português"
"russian" "slovenian" "español" "svenska" "türkçe" ""))
(
(if (= @language #thislang) (set #catalog #n))
(set #n (+ #n 1))
)
)
(set #n 0)
(set #catalogs 1)
(until (= #n #catalog)
(set #catalogs (* #catalogs 2))
(set #n (+ #n 1))
)
(if (= @user-level 2)
(set #catalogs
(askoptions
(prompt "Select the languages you want to install (English is built-in).")
(help "Checkmark the languages you want to install, and click 'Proceed'.")
(choices
"Bosnian" "Catalan" "Czech" "Danish" "Dutch" "Finnish"
"French" "German" "Hungarian" "Italian" "Norwegian" "Polish" "Portuguese"
"Russian" "Slovenian" "Spanish" "Swedish" "Turkish")
(default #catalogs)
)
)
)
(if (> #catalogs 0)
(makedir (tackon @default-dest "Catalogs/"))
)
(set #n 0)
(while (set #thislang (select #n
"bosanski" "català" "czech" "dansk" "nederlands" "suomi"
"français" "deutsch" "magyar" "italiano" "norsk" "polski" "português"
"russian" "slovensko" "español" "svenska" "türkçe" ""))
(
(if (IN #catalogs #n)
(copyfiles
(source (tackon #source-dir (cat "Catalogs/" #thislang "/Amster.catalog")))
(dest (tackon @default-dest (cat "Catalogs/" #thislang)))
)
)
(set #n (+ #n 1))
)
)
)
)
)
(procedure P_copy-sources
(if (exists (tackon #source-dir "Source/include/"))
(
(set #copysource 0)
(if (= @user-level 2)
(set #copy-source
(askchoice
(help @askchoice-help)
(prompt "Do you want to install sources?")
(choices "Yes" "No")
(default 0)
)
)
)
(if (= #copy-source 0)
(
(set #SourceDir (tackon @default-dest "Source"))
(if (not (exists #SourceDir)) (makedir #SourceDir))
(copyfiles
(source (tackon #source-dir "Source/"))
(dest #SourceDir)
(all)
)
)
)
)
)
)
(welcome "Welcome to the Amster 0.8 installation.\n")
(set @app-name "Amster 0.8")
(P_check-system-version)
(complete 0)
(set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon))
(expandpath @icon))
)
(P_select-destination-directory)
(complete 10)
(makedir @default-dest (infos))
(complete 20)
(P_select-languages)
(complete 30)
; Copy program file and documentation
(copyfiles
(help @copyfiles-help)
(prompt "Install program and documentation.")
(confirm)
(source #source-dir)
(dest @default-dest)
(pattern "(README|COPYING|CHANGES|(Amster)(|.guide)(|.servers))")
(noposition)
)
(complete 40)
; Copy ARexx scripts
(set #RexxDir (tackon @default-dest "Rexx"))
(if (not (exists #RexxDir)) (makedir #RexxDir))
(copyfiles
(help @copyfiles-help)
(prompt "Select the ARexx scripts you want to install.")
(confirm)
(source (tackon #source-dir "Rexx/"))
(dest #RexxDir)
(all)
)
(complete 50)
; Copy icons
(set #Icons 1)
(if (< #os-version 44)
(set #Icons 0)
)
(if (= @user-level 2)
(set #Icons
(askchoice
(help @askchoice-help)
(prompt "Which icons do you want to install?")
(choices "NewIcons" "OS3.5 icons")
(default #Icons)
)
)
)
(set #IconSource
(select #Icons
"Icons/NewIcons/"
"Icons/OS3.5/"
)
)
(set #IconDir (tackon @default-dest "Icons"))
(if (not (exists #IconDir)) (makedir #IconDir))
(copyfiles
(help @copyfiles-help)
(source (tackon #source-dir #IconSource))
(dest #IconDir)
(pattern "Amster_(on|off)line.info")
)
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Amster.info"))
(dest @default-dest)
)
(complete 55)
(if (exists (tackon @default-dest "Amster.guide"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "Amster.guide.info")
)
)
(if (exists (tackon @default-dest "README"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "README.info")
)
)
(if (exists (tackon @default-dest "COPYING"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "COPYING.info")
)
)
(if (exists (tackon @default-dest "CHANGES"))
(copyfiles
(help @copyfiles-help)
(source (tackon (tackon #source-dir #IconSource) "Guide.info"))
(dest @default-dest)
(newname "CHANGES.info")
)
)
(complete 60)
(P_copy-sources)
(complete 70)
(copylib
(prompt "Installing MUI class - NList.mcc")
(source "MUI/NList.mcc")
(dest "MUI:Libs/MUI/")
(confirm)
(help @copylib-help)
)
(complete 80)
(copylib
(prompt "Installing MUI class - NListview.mcc")
(source "MUI/NListview.mcc")
(dest "MUI:Libs/MUI/")
(confirm)
(help @copylib-help)
)
(complete 90)
(copylib
(prompt "Installing MUI class - Lamp.mcc")
(source "MUI/Lamp.mcc")
(dest "MUI:Libs/MUI/")
(confirm)
(help @copylib-help)
)
; Show README
;(showmedia 'media' "README" 'upper_left' 'medium' 1)
;(closemedia media)
(complete 100)
(set #textinput-version (/ (getversion "LIBS:MUI/Textinput.mcc") 65536))
(if (< #textinput-version 26)
(message "\n\nAmster needs MCC_Textinput V26+!\n\nMCC_Textinput can be downloaded from\nftp.vapor.com (directory: /pub/misc)\n\nPlease install MCC_Textinput before running Amster.\n")
)
(exit "The installation of Amster is finished." (quiet))